package com.gitee.jmliu1983.finacehelper.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gitee.jmliu1983.finacehelper.mapper.TransactionsFundMapper;
import com.gitee.jmliu1983.finacehelper.domain.TransactionsFund;
import com.gitee.jmliu1983.finacehelper.service.ITransactionsFundService;

/**
 * 个人持仓记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-27
 */
@Service
public class TransactionsFundServiceImpl implements ITransactionsFundService 
{
    @Autowired
    private TransactionsFundMapper transactionsFundMapper;

    /**
     * 查询个人持仓记录
     * 
     * @param transactionId 个人持仓记录主键
     * @return 个人持仓记录
     */
    @Override
    public TransactionsFund selectTransactionsFundByTransactionId(Long transactionId)
    {
        return transactionsFundMapper.selectTransactionsFundByTransactionId(transactionId);
    }

    /**
     * 查询个人持仓记录列表
     * 
     * @param transactionsFund 个人持仓记录
     * @return 个人持仓记录
     */
    @Override
    public List<TransactionsFund> selectTransactionsFundList(TransactionsFund transactionsFund)
    {
        return transactionsFundMapper.selectTransactionsFundList(transactionsFund);
    }

    /**
     * 新增个人持仓记录
     * 
     * @param transactionsFund 个人持仓记录
     * @return 结果
     */
    @Override
    public int insertTransactionsFund(TransactionsFund transactionsFund)
    {
        return transactionsFundMapper.insertTransactionsFund(transactionsFund);
    }

    /**
     * 修改个人持仓记录
     * 
     * @param transactionsFund 个人持仓记录
     * @return 结果
     */
    @Override
    public int updateTransactionsFund(TransactionsFund transactionsFund)
    {
        return transactionsFundMapper.updateTransactionsFund(transactionsFund);
    }

    /**
     * 批量删除个人持仓记录
     * 
     * @param transactionIds 需要删除的个人持仓记录主键
     * @return 结果
     */
    @Override
    public int deleteTransactionsFundByTransactionIds(Long[] transactionIds)
    {
        return transactionsFundMapper.deleteTransactionsFundByTransactionIds(transactionIds);
    }

    /**
     * 删除个人持仓记录信息
     * 
     * @param transactionId 个人持仓记录主键
     * @return 结果
     */
    @Override
    public int deleteTransactionsFundByTransactionId(Long transactionId)
    {
        return transactionsFundMapper.deleteTransactionsFundByTransactionId(transactionId);
    }
}
